﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Workorders.Inventory
{
    /// <summary>
    /// 出入库存记录表
    /// </summary>
    [Table("inventoryTransactionWordOrder")]
    public class InventoryTransactionWordOrder
    {
        /// <summary>
        /// 自增主键
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 出入库单号
        /// </summary>
        [Required]
        [MaxLength(30)]
        public string TransactionNo { get; set; }

        /// <summary>
        /// 出入库时间
        /// </summary>
        public DateTime? TransactionTime { get; set; }

        /// <summary>
        /// 出入库类型
        /// </summary>
        [MaxLength(30)]
        public string TransactionType { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        [MaxLength(30)]
        public string WarehouseName { get; set; }

        /// <summary>
        /// 库位名称
        /// </summary>
        [MaxLength(30)]
        public string LocationName { get; set; }

        /// <summary>
        /// 货品编号
        /// </summary>
        [MaxLength(30)]
        public string ProductCode { get; set; }

        /// <summary>
        /// 货品名称
        /// </summary>
        [MaxLength(30)]
        public string ProductName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [MaxLength(30)]
        public string Specification { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [MaxLength(30)]
        public string Unit { get; set; }

        /// <summary>
        /// 货品类型
        /// </summary>
        [MaxLength(30)]
        public string ProductType { get; set; }

        /// <summary>
        /// 入库单价
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal? InboundPrice { get; set; }

        /// <summary>
        /// 入库数量
        /// </summary>
        public int? InboundQuantity { get; set; }

        /// <summary>
        /// 出入库标识(1:入库,0:出库)
        /// </summary>
        public int? TransactionFlag { get; set; }

        ///// <summary>
        ///// 生产日期
        ///// </summary>
        //public DateTime? ProductionDate { get; set; }

        ///// <summary>
        ///// 有效时间
        ///// </summary>
        //public DateTime? ExpirationDate { get; set; }

        ///// <summary>
        ///// 批次
        ///// </summary>
        //[MaxLength(30)]
        //public string BatchNo { get; set; }
    }
}
